package com.zhihu_lvliangi_android.domain;

import java.io.Serializable;
import java.util.List;

/**
 * 给客户端传送JSON格式的分页数据 接口serializable 实现类对象的序列化
 */
public class JsonPageModel<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9035249864303462313L;
	private Integer status;
	private String msg;
	private Result<T> result;

	public class Result<T> {
		private List<T> rows;
		private Integer total;
		
		public List<T> getRows() {
			return rows;
		}
		public void setRows(List<T> rows) {
			this.rows = rows;
		}
		public Integer getTotal() {
			return total;
		}
		public void setTotal(Integer total) {
			this.total = total;
		}
		@Override
		public String toString() {
			return "Result [rows=" + rows + ", total=" + total + "]";
		}

	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Result<T> getResult() {
		return result;
	}

	public void setResult(Result<T> result) {
		this.result = result;
	}

	@Override
	public String toString() {
		return "JsonPageModel [status=" + status + ", msg=" + msg + ", result="
				+ result + "]";
	}
	
	

}
